#ifndef DYNINTSTACK_H
#define DYNINTSTACK_H

#include <iostream>
using namespace std;

class DynIntStack
{
public:
	DynIntStack();
	void push(int);
	void pop(int &);
	bool isEmpty();
private:
	class StackNode
	{
		friend class DynIntStack;
		int value;
		StackNode *next;
		// Constructor
		StackNode(int val, StackNode *nxt = NULL)
		{
			value = val;
			next = nxt;
		}
	};
	StackNode *top;
};

#endif